/**
 * File: index.tsx
 * Project: reactssr
 * Created Date: Tuesday 2018/01/02 10:58:48
 * Author: zhengjiang
 * -----
 * Last Modified: Thursday 2018/01/04 13:46:24
 * Modified By: zhengjiang
 * -----
 * Description: 
 * 
 */
import * as React from 'react';
import { withReduxSaga } from '../store/index';
import { indexActions } from '../store/IndexStore/action';
import IndexRoute from '../route/index';
import Layout from '../componment/Layout';

const IndexPage: any = ({ pathname }) => {
	return (
		<Layout pathname={pathname}>
			<IndexRoute />
		</Layout>
	);
};

IndexPage.getInitialProps = async ({ store, req, pathname }) => {
	store.dispatch(indexActions.initCount({ count: 15 }));
	return { pathname };
};

export default withReduxSaga(IndexPage);
